home *** CD-ROM | disk | FTP | other *** search
/ VCD Film, Television & An…on Creation Encyclopedia / mycd.iso / Direct5 / DATA.Z / SIMPDONE.DIR / 00008_Ball Parent Script.ls < prev    next >
Encoding:
Text File  |  1996-03-15  |  524 b   |  21 lines

  1. property horizPos
  2.  
  3. on new me
  4.   set the horizPos of me to 256
  5.   set the locH of sprite 2 to the horizPos of me
  6.   set the locV of sprite 2 to 192
  7.   return me
  8. end
  9.  
  10. on moveBall me, direction
  11.   set the horizPos of me to (direction * 50) + the horizPos of me
  12.   set stageWidth to the stageRight - the stageLeft
  13.   if the horizPos of me > (stageWidth + 187) then
  14.     set the horizPos of me to 0
  15.   end if
  16.   if the horizPos of me < -187 then
  17.     set the horizPos of me to stageWidth
  18.   end if
  19.   set the locH of sprite 2 to horizPos
  20. end
  21.